package org.example.video.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.commons.entity.Barrage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 视频弹幕 Mapper 接口
 * </p>
 *
 * @author baomidou
 * @since 2025-04-03
 */

@Mapper
public interface BarrageMapper extends BaseMapper<Barrage> {
    @Select("SELECT * FROM sys_barrage WHERE vid = #{vid} ORDER BY time ASC")
    List<Barrage> findByVideoId(Long vid);
}
